package com.webtech.chidiya;

import com.webtech.utils.Constants;

import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;

public class SplashScreen extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		try {
			super.onCreate(savedInstanceState);

			new AsyncTask<String, String, String>() {

				@Override
				protected void onPreExecute() {

				}

				@Override
				protected String doInBackground(String... arg0) {
					try {
						Thread.sleep(Constants.SPLASH_TIME);
					} catch (Exception e) {
						e.printStackTrace();
					}
					return null;
				}

				@Override
				protected void onPostExecute(String unused) {
					if (!isFinishing()) {
						Intent i = new Intent(SplashScreen.this,
								OptionsActivity.class);
						startActivity(i);

					}
				}
			}.execute();
		} catch (Exception e) {
			e.printStackTrace();

		}
	}

}
